<navbar>

<a class="pointer navbar-page-btn" ng-if="::!dashboardMeta.isSnapshot" ng-click="openSearch()">
	<i class="icon-gf icon-gf-dashboard"></i>
	<span>{{dashboard.title}}</span>
	<i class="fa fa-caret-down"></i>
</a>

<a class="pointer navbar-page-btn" ng-if="::dashboardMeta.isSnapshot" bs-tooltip="titleTooltip" data-placement="bottom" ng-click="openSearch()">
	<i class="icon-gf icon-gf-snapshot"></i>
	<span>
		{{dashboard.title}}
		<em class="small">&nbsp;&nbsp;(snapshot)</em>
	</span>
</a>

<ul class="nav pull-left dashnav-action-icons">
	<li ng-show="::dashboardMeta.canStar">
		<a class="pointer" ng-click="starDashboard()">
			<i class="fa" ng-class="{'fa-star-o': !dashboardMeta.isStarred, 'fa-star': dashboardMeta.isStarred}" style="color: orange;"></i>
		</a>
	</li>
	<li ng-show="::dashboardMeta.canShare" class="dropdown">
		<a class="pointer" ng-click="hideTooltip($event)" bs-tooltip="'Share dashboard'" data-placement="bottom" data-toggle="dropdown"><i class="fa fa-share-square-o"></i></a>
		<ul class="dropdown-menu">
			<li>
				<a class="pointer" ng-click="shareDashboard(0)">
					<i class="fa fa-link"></i> Link to Dashboard
					<div class="dropdown-desc">Share an internal link to the current dashboard. Some configuration options available.</div>
				</a>
			</li>
			<li>
				<a class="pointer" ng-click="shareDashboard(1)">
					<i class="icon-gf icon-gf-snapshot"></i>Snapshot
					<div class="dropdown-desc">Interactive, publically accessible dashboard. Sensitive data is stripped out.</div>
				</a>
			</li>
      <li>
				<a class="pointer" ng-click="shareDashboard(2)">
					<i class="fa fa-cloud-upload"></i>Export
					<div class="dropdown-desc">Export the dashboard to a JSON file for others and to share on Grafana.net</div>
				</a>
			</li>
		</ul>
	</li>
	<li ng-show="::dashboardMeta.canSave">
		<a ng-click="saveDashboard()" bs-tooltip="'Save dashboard <br> CTRL+S'" data-placement="bottom"><i class="fa fa-save"></i></a>
	</li>
	<li ng-if="dashboard.snapshot.originalUrl">
		<a ng-href="{{dashboard.snapshot.originalUrl}}" bs-tooltip="'Open original dashboard'" data-placement="bottom"><i class="fa fa-link"></i></a>
	</li>
	<li ng-if="::showSettingsMenu" class="dropdown">
		<a class="pointer" ng-click="hideTooltip($event)" bs-tooltip="'Manage dashboard'" data-placement="bottom" data-toggle="dropdown"><i class="fa fa-cog"></i></a>
		<ul class="dropdown-menu">
			<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="openEditView('settings');">Settings</a></li>
			<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="openEditView('annotations');">Annotations</a></li>
			<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="openEditView('templating');">Templating</a></li>
			<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="viewJson();">View JSON</a></li>
			<li ng-if="contextSrv.isEditor && !dashboard.editable"><a class="pointer" ng-click="makeEditable();">Make Editable</a></li>
			<li ng-if="contextSrv.isEditor"><a class="pointer" ng-click="saveDashboardAs();">Save As...</a></li>
			<li ng-if="dashboardMeta.canSave"><a class="pointer" ng-click="deleteDashboard();">Delete dashboard</a></li>
		</ul>
	</li>
</ul>

<ul class="nav dash-playlist-actions" ng-if="playlistSrv">
	<li>
		<a ng-click="playlistSrv.prev()"><i class="fa fa-step-backward"></i></a>
	</li>
	<li>
		<a ng-click="playlistSrv.stop()"><i class="fa fa-stop"></i></a>
	</li>
	<li>
		<a ng-click="playlistSrv.next()"><i class="fa fa-step-forward"></i></a>
	</li>
</ul>

<ul class="nav pull-right">
	<li ng-show="dashboard.meta.fullscreen" class="dashnav-back-to-dashboard">
		<a ng-click="exitFullscreen()">
			Back to dashboard
		</a>
	</li>
	<li ng-if="dashboard">
		<gf-time-picker dashboard="dashboard"></gf-time-picker>
	</li>
</ul>

</navbar>
